﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Leaf.NetCore.HotUpdate
{
    [XmlRoot(ElementName = "info")]
    public class IISXmlModel
    {
        /// <summary>
        /// 对应唯一编码
        /// </summary>
        [XmlElement(ElementName = "id")]
        public string id { get; set; }

        /// <summary>
        /// 对应唯一名称
        /// </summary>
        [XmlElement(ElementName = "name")]
        public string name { get; set; }

        /// <summary>
        /// iis名称
        /// </summary>
        [XmlElement(ElementName = "iisname")]
        public string iisname { get; set; }

        /// <summary>
        /// iispath
        /// </summary>
        [XmlElement(ElementName = "iispath")]
        public string iispath { get; set; }

        /// <summary>
        /// ftppath
        /// </summary>
        [XmlElement(ElementName = "ftppath")]
        public string ftppath { get; set; }

        /// <summary>
        /// 排除文件
        /// </summary>
        [XmlElement(ElementName = "exclude")]
        public string exclude { get; set; }

        /// <summary>
        /// 监控文件变化
        /// </summary>
        [XmlElement(ElementName = "watcher")]
        public string watcher { get; set; }

        /// <summary>
        /// 发布间隔
        /// </summary>
        [XmlElement(ElementName = "second")]
        public string second { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        [XmlElement(ElementName = "pubdate")]
        public string pubdate { get; set; }

        /// <summary>
        /// 发布状态
        /// </summary>
        [XmlElement(ElementName = "pubstate")]
        public string pubstate { get; set; }
    }

    [XmlRoot(ElementName = "iis")]
    public class IISMainXML
    {
        [XmlElement(ElementName = "info")]
        public List<IISXmlModel> info { get; set; }

        public DateTime lastTime { get; set; }
    }
}